﻿#include <fast_io.h>

namespace Helium {

bool isRunning{true};

void helium_cleanmemory() noexcept {   
	if (isRunning) [[unlikely]] {
		isRunning = false;
	}

}

void Helium_exit() noexcept {   
	helium_cleanmemory(); 
}

}  // namespace Helium

#if (__has_cpp_attribute(__gnu__::__stdcall__) && !defined(__WINE__))
[[__gnu__::__stdcall__]]
#endif
int
#if (!__has_cpp_attribute(__gnu__::__stdcall__) && !defined(__WINE__)) && defined(_MSC_VER)
	__stdcall
#endif
DllMain(void *hModule, std::uint_least32_t ul_reason_for_call, void *lpReserved) noexcept {
	switch (ul_reason_for_call) {
	case 1 /*DLL_PROCESS_ATTACH*/: {
		break;
	}
	case 2 /*DLL_THREAD_ATTACH*/:
	case 3 /*DLL_THREAD_DETACH*/:
	case 0 /*DLL_PROCESS_DETACH*/:
		break;
	}
	return 1;
};
